package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.concurrent.TimeUnit;

@Service
public class HelloServiceImpl implements HelloService {

    @Override
    public String methodA() throws InterruptedException {
        int random = (int) (Math.random() * 100);
        TimeUnit.MILLISECONDS.sleep(random);
        System.out.println("methodA");
        return "methodA";
    }

    @Override
    public String methodB() throws InterruptedException {
        int random = (int) (Math.random() * 100);
        TimeUnit.MILLISECONDS.sleep(random);
        System.out.println("methodB");
        return "methodB";
    }

    @Override
    public String methodC() throws InterruptedException {
        int random = (int) (Math.random() * 100);
        TimeUnit.MILLISECONDS.sleep(random);
        System.out.println("methodC");
        return "methodC";
    }
}
